// -------------------------------------------------------------------------
//    @FileName         :    {Filename}
//    @Author           :    GaoYi
//    @Date             :    2017-09-27
//    @Module           :   {Filename}
//
// -------------------------------------------------------------------------

#pragma once

#include "NFTimerItem.h"
#include "NFTimerWheelManager.h"
#include "NFComm/NFPluginModule/NFPlatform.h"

NFTimerItem::NFTimerItem()
{

}

NFTimerItem::~NFTimerItem()
{

}

void NFTimerItem::DoHeartBeatEvent()
{
    if (mSelf.IsNull() && !mTimerName.empty())
    {
        if (mModuleFunctor)
        {
            mModuleFunctor(mTimerName, mInterVal, mCallCount);
        }
    }
    else
    {
        if (mObjectFunctor)
        {
            mObjectFunctor(mSelf, mTimerID, mInterVal, mCallCount);
        }
    }
}

